package com.kc.business.service.impl;

import com.kc.business.domain.BizCreation;
import com.kc.business.domain.BizUserCreation;
import com.kc.business.mapper.BizCreationMapper;
import com.kc.business.service.IBizCreationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 旅知模块业务处理实现类
 */
@Service
public class BizCreationServiceImpl implements IBizCreationService {
    @Autowired
    private BizCreationMapper bizCreationMapper;
    /**
     * 写入数据
     * @param bizCreation
     * @return
     */
    @Override
    public Integer insertData(BizCreation bizCreation) {
        bizCreation.setScenicId(bizCreation.getThemeId());
        bizCreationMapper.insert(bizCreation);
        return bizCreation.getId();
    }

    /**
     * 获取列表
     * @return
     */
    @Override
    public List<BizCreation> getList(BizUserCreation bizCreation) {
        return bizCreationMapper.getList(bizCreation);
    }
    /**
     * 更新数据
     * @param bizCreation
     * @return
     */
    @Override
    public Integer updateData(BizCreation bizCreation) {
        return bizCreationMapper.updateData(bizCreation);
    }
    /**
     * 更新数据状态
     * @param bizCreation
     * @return
     */
    @Override
    public Integer updateDataStatus(BizCreation bizCreation) {
        return bizCreationMapper.updateDataStatus(bizCreation);
    }
    /**
     * 删除数据
     * @param bizCreation
     * @return
     */
    @Override
    public Integer deleteData(BizCreation bizCreation) {
        return bizCreationMapper.deleteData(bizCreation);
    }
}
